from fastapi import FastAPI
from fastapi_socketio import SocketManager
import uvicorn

app = FastAPI()
socket_manager = SocketManager(app=app, mount_location="/ws")


@socket_manager.on('connect', namespace="/ws")
async def connect(sid, environ):
    print(sid)
    print(environ)


if __name__ == "__main__":
    uvicorn.run(app, host="localhost", port=8888)